﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Model.Country>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Admin.ViewModels" %>
<%@ Import Namespace="SDT.Model"%>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Header" runat="server">
	Mục đích sử dụng các công trình - nhà cửa
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Toolbar" runat="server">
	<%= Html.Toolbar("Xóa", string.Format("/Country/Delete/{0}", Model.Id), "delete")%>
	<%= Html.Toolbar("Quay lại", "/Country", "back")%>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if(ViewData["MessageInfo"]==null){ %>
    <% using (Html.BeginForm("Edit", "Country", FormMethod.Post, new { id = "adminForm" }))
       {%>
        <%= Html.ValidationSummary(true) %>     
        <fieldset>
            <legend>Sửa</legend>
			<font color="red">*</font> là trường bắt buộc phải nhập.
			<table class="admintable">
				<tbody>
				<tr>
					<td class="key">Mã quốc gia (<font color="red">*</font>)</td>
					<td>
						<%= Html.TextBoxFor(model => model.CountryCode, new { @class = "required", maxlength = 3 })%>
					</td>
				</tr>
				<tr>
					<td class="key">Tên quốc gia (<font color="red">*</font>)</td>
					<td>
						<%= Html.TextBoxFor(model => model.CountryName, new { @class = "required", maxlength = 100 })%>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="submit" value="Lưu" /></td>
				</tr></tbody>
			 </table>
        </fieldset>
    <% } %>
    <script type="text/javascript">
		$(document).ready(function() {
			$("#adminForm").validate();
		});
	</script>
<% } %>
</asp:Content>
